<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>获取 XML 解析器错误代码</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.xml-get-current-line-number.html">xml_get_current_line_number</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.xml-parse-into-struct.html">xml_parse_into_struct</a></div>
 <div class="up"><a href="ref.xml.html">XML 解析器函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.xml-get-error-code" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">xml_get_error_code</h1>
    <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">xml_get_error_code</span> &mdash; <span class="dc-title">获取 XML 解析器错误代码</span></p>

   </div>
   <div class="refsect1 description" id="refsect1-function.xml-get-error-code-description">
    <h3 class="title">说明</h3>
    <div class="methodsynopsis dc-description">
     <span class="type">int</span> <span class="methodname"><strong>xml_get_error_code</strong></span>
      ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$parser</code></span>
     )</div>

    <p class="para rdfs-comment">
     获取 XML 解析器错误代码。
    </p>
   </div>

   <div class="refsect1 parameters" id="refsect1-function.xml-get-error-code-parameters">
    <h3 class="title">参数</h3>
    <p class="para">
     <dl>

      
       <dt>
<em><code class="parameter">parser</code></em></dt>

       <dd>

        <p class="para">
         一个指向要返回错误代码的 XML 解析器的指针
        </p>
       </dd>

      
     </dl>

    </p>
   </div>

   <div class="refsect1 returnvalues" id="refsect1-function.xml-get-error-code-returnvalues">
    <h3 class="title">返回值</h3>
    <p class="para">
     如果 <em><code class="parameter">parser</code></em> 参数没有指向一个合法的解析器，该函数将返回 <strong><code>FALSE</code></strong>，否则将返回<a href="xml.error-codes.html" class="link">错误代码</a>列表中的一个错误代码。
    </p>
   </div>

   <div class="refsect1 seealso" id="refsect1-function.xml-get-error-code-seealso">
    <h3 class="title">参见</h3>
    <p class="para">
     <ul class="simplelist">
      <li class="member"><span class="function"><a href="function.xml-error-string.html" class="function" rel="rdfs-seeAlso">xml_error_string()</a> - 获取 XML 解析器的错误字符串</span></li>
     </ul>
    </p>
   </div>

  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.xml-get-current-line-number.html">xml_get_current_line_number</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.xml-parse-into-struct.html">xml_parse_into_struct</a></div>
 <div class="up"><a href="ref.xml.html">XML 解析器函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
